@{block content}

<h1>{$title}</h1>

<p>
    <a href="{plink Resources:add}" class="button ui-state-default ui-corner-all" title="{!_'Add resource'}">{!_"Add resource"}</a>
    {if ($search !== "" && $search !== null)}
        <a href="{plink default ''}" class="button ui-state-default ui-corner-all" title="{!_'Show all resources'}">{!_"Show all resources"}</a>
    {/if}
</p>


{include '../aclSearch.phtml'}

{snippet list}

{control paginator}

<table>
    <tr><th>{!_"ID"}</th><th>{!_"Name"}</th><th>{!_"Created"}</th><th>{!_"Edit"}</th><th>{!_"Delete"}</th></tr>
{foreach $resources as $resource}
    <tr>
        <td>{$resource['id']}</td>
        <td>{$resource['name']}</td>
        <td>{$resource['created']->format("j.n.Y G:i:s")}</td>
        <td><a href="{plink Resources:edit, $resource['id']}" class="button ui-state-default ui-corner-all" title="{!_'Edit resource'}"><span class="ui-icon ui-icon-wrench">{!_"edit"}</span></a></td>
        <td><a href="{plink Resources:delete, $resource['id']}" class="button ui-state-default ui-corner-all" title="{!_'Delete resource'}"><span class="ui-icon ui-icon-trash">{!_"delete"}</span></a></td>
    </tr>

{/foreach}
</table>


{/snippet}